import { ElNotification, ElMessageBox } from "element-plus";
import nProgress from "nprogress";

export function InfoToast(msg, infoType) {
  ElNotification({
    title: msg,
    type: infoType,
  });
}

export function showModel(content = "提示内容", type = "warning", title = "") {
  return ElMessageBox.confirm(content, title, {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type,
  });
}

// 显示loading
export function showProgress() {
  nProgress.start();
}

export function hideProgress() {
  nProgress.done()
}
